home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install-AWeb31 0.2 (20.12.97)
- ; Description: Installer script for AWeb-II 3.0(b) -> 3.1 patch
-
- (complete 0)
-
- (set #welcome
- (cat "This installation procedure installs the AWeb-II 3.1 patch on your system.\n\n"
- "You must have installed AWeb-II 3.0(b) previously.\n\n"
- "You will need the original AWeb-II 3.0 or 3.0b disks for this installation procedure."
- )
- )
-
- (set #no-aweb30
- (cat "AWeb3: assign not found.\nYou haven't properly installed AWeb-II 3.0(b).\n\n"
- "The AWeb-II 3.1 patch is not applied."
- )
- )
-
- (set #ask-backup
- "Do you want to make a backup copy of the currently installed version of AWeb-II?"
- )
-
- (set #backup-help
- (cat "If you select YES, a backup will be made of the executable files "
- "that will be changed by this installation.\n"
- "You will be prompted for a (preferrably new) drawer where to store "
- "the files."
- )
- )
-
- (set #backup-prompt
- "Select a location for the backup copy of the current files"
- )
-
- (set #insert-disk1
- (cat "Please insert disk 1 of the original AWeb-II 3.0 or 3.0b distribution "
- "(AWeb3.0_Disk1) into any drive\n"
- )
- )
-
- (set #settingup "Setting up utilities")
- (set #patching "Patching %s\n\nBe patient, this can take a while...")
- (set #installing "Installing %s")
-
- (set #invalid-version
- (cat "Patch could not be performed.\n"
- "The file '%s' has an invalid version. This patch can ONLY be applied "
- "to AWeb-II version 3.0 or 3.0b\n\n"
- "Installation procedure terminated."
- )
- )
-
- (set #ask_run
- (cat "The first time you run AWeb again, you will have to re-enter "
- "the serial number found on the original distribution, and your name.\n\n"
- "Do you want to start AWeb now?"
- )
- )
-
- (set #ready "Installation of AWeb-II 3.0(b) -> 3.1 patch complete.")
-
- ;===========================================================================
-
- ;---- Procedure to extract 1 file from an archive into T: ----
-
- (procedure P_extract #arc #file
-
- ; Build command like
- ; T:lhex -w=T: e AWeb3.0_Disk1:<#arc> <#file>
- ;
- ; extracts 1 file from the archive on the distribution disk into T:
- (run
- ("T:lhex -w=T: e AWeb3.0_Disk1:%s %s" #arc #file)
- )
- )
-
-
- ;---- Procedure to get the checksum for a file in T: ----
-
- (procedure P_getsum #file
-
- (getsum (tackon "T:" #file))
- )
-
-
- ;---- Procedure to patch 1 file (with checksum checked if it is supplied) ----
-
- (procedure P_Patch1 #file #sum #pch
-
- (if (<> #sum "")
- (
- (if (<> #sum (P_getsum #file))
- (
- (delete (tackon "T:" #file))
- (exit (#invalid-version #file) (quiet))
- )
- )
- )
- )
-
- ; Build command like
- ; T:spatch -p<path><#pch> -oAWeb3:<#file> T:<#file>
- ;
- ; patches the original file in T: using the .pch file building a new file in AWeb3:
- (run
- (cat
- "T:spatch -p"
- (tackon "AWeb31PATCH:" #pch)
- (" -oAWeb3:%s T:%s" #file #file)
- )
- )
-
- ; Delete the original file from T:
- (delete
- (cat "T:" #file)
- )
- )
-
-
- ;---- Procedure to extract and patch 1 file ----
-
- (procedure P_patch #arc #file #sum #pch
-
- (working (#patching #file))
-
- (P_extract #arc #file)
-
- (P_patch1 #file #sum #pch)
- )
-
-
- ;---- Procedure to extract 1 file and patch it depending on checksum ----
-
- ; If extracted program has checksum #sum2, patch #pch2 is applied first
- ; and the result is copied back to the location (T:) of the extracted progam.
- ; Then patch #pch1 is applied to the extracted (or in the 1st pass patched)
- ; program if its checksum matches #sum1.
- ;
- ; #complete percentage is increased by 3 * #dcomplete after completion.
-
- (procedure P_patch_depending #arc #file #sum1 #pch1 #sum2 #pch2 #complete #dcomplete
-
- (working (#patching #file))
-
- (P_extract #arc #file)
-
- (set #sum (P_getsum #file))
-
- (complete (set #complete (+ #complete #dcomplete)))
-
- (if (= #sum #sum2)
- (
- (P_patch1 #file "" #pch2)
-
- (copyfiles
- (source (tackon "AWeb3:" #file))
- (dest "T:")
- (nogauge)
- )
-
- (set #sum (P_getsum #file))
- )
- )
-
- (complete (set #complete (+ #complete #dcomplete)))
-
- (if (= #sum #sum1)
- (
- (P_patch1 #file "" #pch1)
- )
- (
- (delete (tackon "T:" #file))
- (exit (#invalid-version #file) (quiet))
- )
- )
-
- (complete (set #complete (+ #complete #dcomplete)))
- )
-
- ;===========================================================================
-
- ;---- Display welcome message ----
-
- (message #welcome)
-
- ;---- Check the existence of AWeb3: assign ----
-
- (if
- (not (exists "AWeb3:"))
- (
- (message #no-aweb30)
- (exit (quiet))
- )
- )
-
- (set @default-dest (expandpath "AWeb3:"))
-
- ;---- Ask for backup of current versions ----
-
- (if
- (askbool
- (prompt #ask-backup)
- (help #backup-help)
- )
- (
- (set #backup
- (askdir
- (prompt #backup-prompt)
- (help @askfile-help)
- (default (tackon (expandpath "AWeb3:") "backup3.0"))
- (newpath)
- )
- )
- (if (not (exists #backup))
- (
- (makedir #backup)
- )
- )
-
- (copyfiles
- (source "AWeb3:")
- (choices "AWeb-II" "AWebCfg")
- (dest #backup)
- (optional "nofail")
- )
-
- (copyfiles
- (source "AWeb3:aweblib")
- (all)
- (dest (tackon #backup "aweblib"))
- (optional "nofail")
- )
- )
- )
-
- (complete 5)
-
- ;---- Let the user insert the correct disk ----
-
- (askdisk
- (prompt #insert-disk1)
- (help @askdisk-help)
- (dest "AWeb3.0_Disk1")
- )
-
- ;---- Copy required utilities to T: ----
-
- (copyfiles
- (prompt #settingup)
- (help @copyfiles-help)
- (source "AWeb3.0_Disk1:lhex")
- (dest "T:")
- )
-
- (copyfiles
- (prompt #settingup)
- (help @copyfiles-help)
- (source (tackon (pathonly @icon) "spatch"))
- (dest "T:")
- )
-
- ; Make a temporary assign because the spatch utilitiy can't handle
- ; path names with a space
- (makeassign "AWeb31PATCH" (pathonly @icon))
-
- (complete 10)
-
- ;---- Patch AWeb-II ----
-
- (P_patch_depending "aweb2.lha" "AWeb-II"
- -1253492792 "AWeb30b-31.pch"
- 1498876731 "AWeb30-30b.pch"
- 10 10)
-
- ;---- Patch AWebCfg ----
-
- (P_patch_depending "aweb1.lha" "AWebCfg"
- -1623681170 "AWebCfg30b-31.pch"
- 664509881 "AWebCfg30-30b.pch"
- 40 5)
-
- ;---- Patch aweblib modules ----
-
- (P_patch "aweb-lib-plug.lha" "aweblib/arexx.aweblib" -794496057 "arexx.pch")
-
- (P_patch "aweb-lib-plug.lha" "aweblib/authorize.aweblib" -30568908 "authorize.pch")
-
- (complete 60)
-
- (P_patch "aweb-lib-plug.lha" "aweblib/cachebrowser.aweblib" 1795294701 "cachebrowser.pch")
-
- (P_patch "aweb-lib-plug.lha" "aweblib/ftp.aweblib" 1459088783 "ftp.pch")
-
- (P_patch "aweb-lib-plug.lha" "aweblib/gopher.aweblib" -1025195164 "gopher.pch")
-
- (complete 65)
-
- (P_patch "aweb-lib-plug.lha" "aweblib/history.aweblib" -1182279980 "history.pch")
-
- (P_patch "aweb-lib-plug.lha" "aweblib/hotlist.aweblib" 491052913 "hotlist.pch")
-
- ;---- Clean up ----
-
- (delete "T:aweblib")
- (delete "T:lhex")
- (delete "T:spatch")
- (makeassign "AWeb31PATCH")
-
- (complete 70)
-
- ;---- Install new aweblib modules ----
-
- (working (#installing "aweblib modules"))
-
- (copyfiles
- (source (tackon (pathonly @icon) "aweblib"))
- (dest "AWeb3:aweblib")
- (all)
- )
-
- ;---- Installing AWebJS ----
-
- (working (#installing "AWebJS"))
-
- (copyfiles
- (source (tackon (pathonly @icon) "AWebJS"))
- (dest "AWeb3:")
- )
-
- (complete 75)
-
- ;---- Install new documentation ----
-
- (working (#installing "documentation"))
-
- (copyfiles
- (source (tackon (pathonly @icon) "docs"))
- (dest "AWeb3:docs")
- (all)
- )
-
- (complete 90)
-
- ;---- Install new button set
-
- (working (#installing "buttons"))
-
- (if (exists "AWeb3:storage/buttons")
- (
- (copyfiles
- (source (tackon (pathonly @icon) "storage/buttons"))
- (dest "AWeb3:storage/buttons")
- (all)
- )
- )
- )
-
- ;---- Install new catalogs for those languages installed ----
-
- (working (#installing "catalogs"))
-
- (if (exists "AWeb3:catalogs")
- (
- (set #newcatalogs (tackon (pathonly @icon) "catalogs"))
-
- (foreach "AWeb3:catalogs" "#?"
- (
- (if (exists (tackon #newcatalogs @each-name))
- (
- (copyfiles
- (source (tackon #newcatalogs @each-name))
- (dest (tackon "AWeb3:catalogs" @each-name))
- (all)
- )
- )
- )
- )
- )
- )
- )
-
- (complete 95)
-
- ;---- Flush any existing aweblib modules from memory ----
-
- (run "avail flush >NIL:")
-
- ;---- Ask if AWeb should run now to enter the registration details ----
-
- (if
- (askbool
- (prompt #ask_run)
- (help @askbool-help)
- )
- (
- (run "run AWeb3:AWeb-II local AWeb3:docs/history.html")
- )
- )
-
- (complete 100)
-
- ;---- Ready ----
-
- (exit #ready)
-
-
-